package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 课工场
 * @date 2023/10/17
 * @description
 */
@RestController
@RequestMapping("nacos01")
public class NacosClient01Controller {

    @Value("${server.port}")
    private String port;

    @Value("${spring.cloud.nacos.discovery.cluster-name}")
    private String position;

    @RequestMapping("m1")
    public String method1(){

        return "cluster-name:"+position+ " port : "+port +" NacosClient01Controller ok";
    }

}
